#include "mainwindow.h"
#include <QTranslator>

#include <QApplication>
#include <QStyleFactory>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    QTranslator translator;
    if (translator.load(":/language/language_zh_CN.qm")) {
        qApp->installTranslator(&translator);
    }
    a.setStyle(QStyleFactory::create("Fusion"));
    //设置界面风格
    QPalette palette;
    palette.setColor(QPalette::Window, QColor(53, 53, 53));
    palette.setColor(QPalette::WindowText, Qt::white);
    palette.setColor(QPalette::Base, QColor(15, 15, 15));
    palette.setColor(QPalette::AlternateBase, QColor(53, 53, 53));
    palette.setColor(QPalette::ToolTipBase, Qt::white);
    palette.setColor(QPalette::ToolTipText, Qt::white);
    palette.setColor(QPalette::Text, Qt::white);
    palette.setColor(QPalette::Button, QColor(53, 53, 53));
    palette.setColor(QPalette::ButtonText, Qt::white);
    palette.setColor(QPalette::BrightText, Qt::red);
    //palette.setColor(QPalette::Highlight, QColor(142, 45, 197).lighter()); //紫色
    palette.setColor(QPalette::Highlight, QColor(161, 65, 13).lighter());//橙色
    palette.setColor(QPalette::HighlightedText, Qt::black);
    a.setPalette(palette);


    MainWindow w;
    w.show();
    return a.exec();
}
